<?php
require_once __DIR__.'/vendor/autoload.php';
require_once __DIR__.'/common.php';

use Workerman\Worker;



try{
    $config = get_config();
}catch(\Exception $e){
    echo "error:{$e}\n";
}

if(isset($config['nat_list']) && !is_win()){
    foreach ($config['nat_list'] as $n_key => $n_value) {
        $unique_key = $n_key;
        $nat_client_list['nat_client_worker_'.$n_key] = build_client_woker($n_value);
    }
}else{
    $worker = build_client_woker($config);
}

Worker::runAll();

